package Snake;

public class Barrier extends Cell implements Comparable<Barrier> {

	public Barrier(int x, int y) {
		super(x, y);
	}

	
	
	public boolean isValidToMove(){
		return false;
	}
	

	public boolean isBarrier(){
		return true;
	}
	
	@Override
	public int compareTo(Barrier barrier) {
		if (this.getX() < barrier.getX()) {
			return -1;
		} else if (this.getX() > barrier.getX()) {
			return 1;
		}
		return Integer.compare(this.getY(), barrier.getY());
	}

	@Override
	public String toString() {
		return "Barrier [x=" + getX() + ", y=" + getY() + "]";
	}
	

}